<!--
 * Created by PhpStorm.
 * 版权所有: 2019~2022 [ hhygyl ]
 * Date: 2019/7/24-14:32
 * Link: http://luckyadmin.luckyhhy.cn
 * FileName: add_model.html
 *-->


{include file="public/open_head" /}



<div class="ok-body" >

    <div class="layui-fluid" >

        <form class="layui-form" style="margin-top: 30px;">


            <div class="layui-form-item " style=""  >
                <label class="layui-form-label" >模型名称：</label >
                <div class="layui-input-block input-custom-width " style="width: 350px;" >
                    <input type="text" name="name" value="" placeholder="请输入模型名称" lay-verify="required" lay-verType="tips" lay-reqText="请输模型名称" autocomplete="off"  class="layui-input name" >
                </div >
            </div >


            {:token()}

            <div class="layui-form-item " >
                <label class="layui-form-label" >模型表名：</label >
                <div class="layui-input-inline input-custom-width " style="width: 350px;" >
                    <input type="text" name="tablename" value=""  placeholder="请输入模型表名"  autocomplete="off"  class="layui-input" >
                </div >

            </div >


            <div class="layui-form-item " >

                <label class="layui-form-label" >列表方法：</label >
                <div class="layui-input-inline input-custom-width "  >
                    <input type="text"  name="list_template" value=""  placeholder="请输入列表方法"  autocomplete="off"  class="layui-input" >
                </div >
                <label class="layui-form-label" >详细方法：</label >
                <div class="layui-input-inline input-custom-width "  >
                    <input type="text"  name="show_template" value=""   placeholder="请输入详细方法"  autocomplete="off"  class="layui-input" >
                </div >

            </div >

            {:widget('forms/submit',array('add','立即提交',2))}


        </form>

    </div >


</div >


<script >

    layui.use(['element', 'form', 'jquery','lucky'], function () {
        var element = layui.element;
        var table = layui.table;
        var form = layui.form;
        var $ = layui.jquery;
        var lucky=layui.lucky;

        /**
         * 提交表单数据
         */
        form.on('submit(add)', function (data) {
            lucky.FormSubmit("{:url('model/AddModel')}", data.field, "table_id", 1);
            return false;
        });

    });
</script >


</body>
</html>